package com.sfac.springboot.modules.account.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author jzq
 * @date 2022/8/26 19:54
 */
@SuppressWarnings({"all"})
@Entity
@Table(name = "account_role_resource")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RoleResource {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(nullable = false, updatable = false)
    private Integer id;

    private Integer roleId;

    private Integer resourceId;

    public RoleResource(Integer roleId, Integer resourceId) {
        this.roleId = roleId;
        this.resourceId = resourceId;
    }

}
